Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --runtime-version to functional test Dapr install #6278

Merged
merged 5 commits into from
Sep 28, 2023

Conversation

willdavsmith
Copy link
Contributor

@willdavsmith willdavsmith commented Sep 16, 2023

Description

This might help with the increase in functional test failures we've been seeing.

  • Adding --runtime-version to functional test dapr install

Type of change

  • This pull request fixes a bug in Radius and has an approved issue (issue link required).

Fixes: #6213

Auto-generated summary

🤖 Generated by Copilot at 5eb2160

Summary

🔁⚡🐛

Retry dapr init in functional test workflow. This improves the reliability of the test suite for the radius project, which depends on dapr.

dapr init fails
retry loop adds resilience
autumn tests go on

Walkthrough

  • Add a retry loop for dapr init command to handle transient errors (link)

@willdavsmith willdavsmith requested a review from a team as a code owner September 16, 2023 10:59
@github-actions
Copy link

github-actions bot commented Sep 16, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository radius-project/radius
Commit ref refs/pull/6278/merge
Unique ID 47de5e4c3a
Image tag pr-47de5e4c3a
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.11.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location radiusdev.azurecr.io/test/functional/shared/recipes/<name>:pr-47de5e4c3a
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-47de5e4c3a
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-47de5e4c3a
  • deployment-engine test image location: radius.azurecr.io/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting samples functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting datastoresrp functional tests...
⌛ Starting shared functional tests...
⌛ Starting ucp functional tests...
✅ datastoresrp functional tests succeeded
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
✅ msgrp functional tests succeeded
✅ daprrp functional tests succeeded
✅ shared functional tests succeeded

@github-actions
Copy link

github-actions bot commented Sep 16, 2023

Test Results

2 981 tests  ±0   2 972 ✔️ ±0   2m 22s ⏱️ +6s
   252 suites ±0          9 💤 ±0 
       1 files   ±0          0 ±0 

Results for commit 8231c63. ± Comparison against base commit 2ca32a6.

This pull request removes 2 and adds 2 tests. Note that renamed tests count towards both.
github.com/radius-project/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/a0799f9a-525a-4b1e-92e5-dd00505880ec
github.com/radius-project/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/a0799f9a-525a-4b1e-92e5-dd00505880ec#01
github.com/radius-project/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/ca0914ec-0f3f-4bb1-a4ee-b76ea54e7e85
github.com/radius-project/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/ca0914ec-0f3f-4bb1-a4ee-b76ea54e7e85#01

♻️ This comment has been updated with latest results.

@github-actions
Copy link

66.2

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 66.2 %
  • main branch coverage: 66.2 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

break
else
echo "dapr init failed, retrying..."
sleep 60
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a minute long wait between retries here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty arbitrary, I'm not sure what the best timeout would be. maybe 30 seconds?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard to pick an appropriate retry interval without really deeply understanding the failure and its root cause. If the root cause is rate-limiting in the GH API then there's some useful info here:

https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limiting


Another solution would be to install a specific Dapr version. If I understand the history here the failure is querying the github API to determine the version.

See: https://github.com/dapr/cli/pull/1134/files

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the context and sharing the dapr pr link, @rynowak. Looks like we are currently installing a specific version

. From https://github.com/dapr/cli/pull/1134/files and https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limiting, looks like throttling limits are higher if requests are authenticated, so we should do that if we aren't already.

@willdavsmith If we aren't sure what the retry interval should be then starting with 60 seconds is pretty aggressive, and exponential backoff would be a better approach. If the problem is indeed rate limiting, then most rate limiting algorithms don't take 60 seconds to replenish tokens. With exponential backoff we can start with a smaller interval and increase it with every retry based on the signal from the server.

Copy link
Contributor

@rynowak rynowak Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@willdavsmith @kachawla

Ummmm acktually .... 🤓

We should start setting --runtime-version ${{ DAPR_VER }}. Our workflow is installing 1.11.0of the CLI and then telling the CLI to install the latest runtime. We need to pass this to the install command here.

If we do this we can hopefully avoid the need for retries.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@willdavsmith can you please update the pr to include the version flag as @rynowak suggested above?

If we still need retries after adding version, then let's start with a smaller interval and exponentially backoff as I mentioned above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@github-actions
Copy link

github-actions bot commented Sep 21, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository radius-project/radius
Commit ref refs/pull/6278/merge
Unique ID 09cdb4d6ff
Image tag pr-09cdb4d6ff
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.11.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location radiusdev.azurecr.io/test/functional/shared/recipes/<name>:pr-09cdb4d6ff
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-09cdb4d6ff
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-09cdb4d6ff
  • deployment-engine test image location: radius.azurecr.io/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting datastoresrp functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting ucp functional tests...
⌛ Starting shared functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting samples functional tests...
✅ datastoresrp functional tests succeeded
✅ msgrp functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ samples functional tests succeeded
✅ shared functional tests succeeded

@github-actions
Copy link

66.2

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 66.2 %
  • main branch coverage: 66.2 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@willdavsmith willdavsmith requested review from a team as code owners September 22, 2023 14:50
@github-actions
Copy link

github-actions bot commented Sep 22, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository radius-project/radius
Commit ref refs/pull/6278/merge
Unique ID bbea24e7aa
Image tag pr-bbea24e7aa
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.11.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location radiusdev.azurecr.io/test/functional/shared/recipes/<name>:pr-bbea24e7aa
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-bbea24e7aa
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-bbea24e7aa
  • deployment-engine test image location: radius.azurecr.io/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting datastoresrp functional tests...
⌛ Starting ucp functional tests...
⌛ Starting shared functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting samples functional tests...
⌛ Starting msgrp functional tests...
✅ datastoresrp functional tests succeeded
✅ ucp functional tests succeeded
✅ samples functional tests succeeded
✅ msgrp functional tests succeeded
✅ daprrp functional tests succeeded
✅ shared functional tests succeeded

@github-actions
Copy link

66.2

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 66.2 %
  • main branch coverage: 66.2 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@willdavsmith willdavsmith force-pushed the willdavsmith/dapr-retry branch from a4f48db to c7df4f2 Compare September 27, 2023 19:29
@willdavsmith willdavsmith changed the title Add retries to functional test Dapr install Add --runtime-version to functional test Dapr install Sep 27, 2023
@github-actions
Copy link

github-actions bot commented Sep 27, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository radius-project/radius
Commit ref refs/pull/6278/merge
Unique ID a6fa77a6ce
Image tag pr-a6fa77a6ce
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.11.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location radiusdev.azurecr.io/test/functional/shared/recipes/<name>:pr-a6fa77a6ce
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-a6fa77a6ce
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-a6fa77a6ce
  • deployment-engine test image location: radius.azurecr.io/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting shared functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting samples functional tests...
⌛ Starting ucp functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting datastoresrp functional tests...
✅ samples functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ msgrp functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ shared functional tests succeeded

@github-actions
Copy link

github-actions bot commented Sep 27, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository radius-project/radius
Commit ref refs/pull/6278/merge
Unique ID b0766eaef9
Image tag pr-b0766eaef9
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.11.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location radiusdev.azurecr.io/test/functional/shared/recipes/<name>:pr-b0766eaef9
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-b0766eaef9
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-b0766eaef9
  • deployment-engine test image location: radius.azurecr.io/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting daprrp functional tests...
⌛ Starting shared functional tests...
⌛ Starting ucp functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting datastoresrp functional tests...
✅ samples functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ msgrp functional tests succeeded
✅ shared functional tests succeeded

@github-actions
Copy link

66.2

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 66.2 %
  • main branch coverage: 66.2 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@github-actions
Copy link

github-actions bot commented Sep 27, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository radius-project/radius
Commit ref refs/pull/6278/merge
Unique ID 0fc4440c4d
Image tag pr-0fc4440c4d
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.11.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location radiusdev.azurecr.io/test/functional/shared/recipes/<name>:pr-0fc4440c4d
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-0fc4440c4d
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-0fc4440c4d
  • deployment-engine test image location: radius.azurecr.io/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting samples functional tests...
⌛ Starting shared functional tests...
⌛ Starting datastoresrp functional tests...
✅ samples functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ msgrp functional tests succeeded
✅ shared functional tests succeeded

@github-actions
Copy link

66.2

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 66.2 %
  • main branch coverage: 66.2 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@willdavsmith willdavsmith merged commit 2176ab8 into main Sep 28, 2023
@willdavsmith willdavsmith deleted the willdavsmith/dapr-retry branch September 28, 2023 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dapr release download within the workflow sometimes gets 403
3 participants